#include "Principal.h"

Principal::Principal(QWidget *parent):QWidget(parent)
{
    ui.setupUi(this);

    connect(this->ui.accelerationCheckBox, SIGNAL(toggled(bool)), this->ui.gLWidget1, SLOT(toggleAcceleration(bool)));

    connect(this->ui.loadModelB, SIGNAL(clicked()), this->ui.gLWidget1, SLOT(LoadModel()));
    connect(this->ui.leafsSP, SIGNAL(valueChanged(int)), this->ui.gLWidget1, SLOT(setFacesPerNode(int)));
    connect(this->ui.gLWidget1, SIGNAL(UpdatedVertexs(int)), this->ui.vertexLCD, SLOT(display(int)));

    connect(this->ui.gLWidget1,SIGNAL(AmbientOclusionCalculated(double)),this->ui.ambientLCD, SLOT(display(double)));
    connect(this->ui.gLWidget1,SIGNAL(AmbienOclusionWithAccelerationCalculated(double)),this->ui.ambientAccelerationLCD, SLOT(display(double)));
    connect(this->ui.gLWidget1,SIGNAL(ObscurancesCalculated(double)),this->ui.obscurancesLCD, SLOT(display(double)));
    connect(this->ui.gLWidget1,SIGNAL(ObscurancesWithAccelerationCalculated(double)),this->ui.obscurancesAccelerationLCD, SLOT(display(double)));

}
